package org.teamh.gui.mapeditor.filechooser;

import java.io.File;

public class NiftyFile {

	private File file;
	
	private long timeStamp;
	
	public NiftyFile(File file) {
		this.file = file;
	}
	
	public File getFile() {
		return file;
	}
	
	public boolean isDoubleClick() {
		long newTimeStamp = System.currentTimeMillis();
		
		if(Math.abs(newTimeStamp - timeStamp) < 250) {
			timeStamp = newTimeStamp;
			return true;
		}
		
		timeStamp = newTimeStamp;
		return false;
	}
}
